<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head><meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"></head>

<body style="font-family: Helvetica,Arial,sans-serif;">
<b>TriMesh</b><br>
<br>
A TriMesh is an indexed geometry <a href="http://en.wikipedia.org/wiki/Polygon_mesh#Face-Vertex_Meshes">face vertex</a> representation of a polygon mesh comprised of triangles. A trimesh contains the following;
<br>
<br>
<ul>
<li>Vertex Buffer : A list of all the vertices used in the mesh</li>
<li>Index Buffer : A list of indices into the vertex buffer for the vertices that define a triangle in the mesh</li>
<li>Normal Buffer : A list of the normal associated with the vertex at the same offset in the vertex buffer</li>
<li>Colour Buffer : A list of colours for each vertex</li>
<li>Texture Coordinate Array : An array of texture coordinates for each vertex</li>
</ul>
<br>
So for example a quad has the following buffers;<br>
---------------------------------------- Vertex Buffer<br>
(v 0) -2.5, 2.5, 0.0<br>
(v 1) -2.5, -2.5, 0.0<br>
(v 2) 2.5, -2.5, 0.0<br>
(v 3) 2.5, 2.5, 0.0<br>
<br><br>
---------------------------------------- IndexBuffer<br>
Num indices = 6<br>
0 1 2<br>
0 2 3<br>
<br><br>
---------------------------------------- TexCoords<br>
tex coords entry 0 (coords per vert = 2)<br>
0.0, 1.0 <br>
0.0, 0.0 <br>
1.0, 0.0 <br>
1.0, 1.0 <br>
<br>
---------------------------------------- NormalBuffer<br>
0.0, 0.0, 1.0<br>
0.0, 0.0, 1.0<br>
0.0, 0.0, 1.0<br>
0.0, 0.0, 1.0<br>
<br><br>

Therefore triangle 0 is made up of<br><br>
indices 0, 1, 2<br>
vertices<br>
(v 0) -2.5, 2.5, 0.0 : texture coordinate = 0.0, 1.0 : normal = 0.0, 0.0, 1.0<br>
(v 1) -2.5, -2.5, 0.0 : texture coordinate = 0.0, 0.0 : normal = 0.0, 0.0, 1.0<br>
(v 2) 2.5, -2.5, 0.0 : texture coordinate = 1.0, 0.0 : normal = 0.0, 0.0, 1.0<br>
</body>
</html>